<template>
  <el-container>
    <el-header>
      <el-row type="flex" justify="center">
        <el-col :span="4">
          <img style="height: 60px" src="@/assets/logo/logo.png" />
        </el-col>
        <el-col :span="10">
          <el-menu
            :default-active="defaultnum"
            class="el-menu-demo"
            mode="horizontal"
            @select="handleSelect"
            background-color="#292838"
            text-color="#fff"
            active-text-color="#ffd04b"
          >
            <el-menu-item index="index">首页</el-menu-item>
            <el-menu-item index="movie">电影</el-menu-item>
            <el-menu-item index="series">电视剧</el-menu-item>
            <el-menu-item index="variety">综艺</el-menu-item>
            <el-menu-item index="book">小说</el-menu-item>
          </el-menu>
        </el-col>
        <el-col :span="6">
          <div class="my-input">
            <el-input>
              <el-button slot="append" icon="el-icon-search"></el-button>
            </el-input>
          </div>
        </el-col>
      </el-row>
    </el-header>
    <el-main>
      <!-- 存放子路由组件 -->
      <router-view></router-view>
    </el-main>
    <el-footer>
      特别声明：本站不提供任何视听上传服务，所有视频内容均来自视频分享站点所提供的公开引用资源，
      <br />如果侵犯了你的权益，请发邮件至： bigorange945@163.com，谢谢合作！
      <br />Copyright © 2020
      <b>Apali影视</b> All Rights Reserved.
    </el-footer>
  </el-container>
</template>

<script>
export default {
  data() {
    return {
      defaultnum: "1" // 默认激活菜单
    };
  },
  methods: {
    handleSelect(key) {
      this.$router.push("/" + key);
      console.log(key);
    }
  }
};
</script>

<style lang="less">
.el-header,
.el-footer {
  background-color: #292838;
}
.my-input {
  margin: 6px;
}
.el-footer {
  text-align: center;
  color: #ffffff;
}
</style>